﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Biz_Dal.Biz;

public partial class The_hien_DropDownList_THE_LOAI : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            List<BizTheLoai> theLoai = new List<BizTheLoai>();
            theLoai = BizTheLoai.getListTheLoaiAll();
            DropDownListTheLoai.DataSource = theLoai;
            DropDownListTheLoai.DataTextField = "tenTheLoai";
            DropDownListTheLoai.DataValueField = "idTheLoai";
            DropDownListTheLoai.DataBind();
            DropDownListTheLoai.Items.Insert(0, new ListItem("Tất cả", "-1"));
            DropDownListTheLoai.SelectedIndex = 0;
        }
    }
}